{
  "pointTypes": {
    "pointType": [
    {{assign var=total value=0}}
	{{foreach from=$userPoints item=point}}
      {
        "pintid": "{{$point->getPointTypeId()}}",
        "point": "{{$point->getPoint()}}"
      },
    {{assign var=total value=$total+$point->getPoint()}}
	{{/foreach}}
      {
        "pintid": "total",
        "point": "{{$total}}"
      }
    ]
  }
}